<?php

class UserAction extends Action{
      
      public function test(){
      	 $User = M('User');
      	 $result = $User->select();
      	 echo $result;
      }
      
      public function add(){
      	    $User = M("User"); // 实例化User对象
    		$data['name'] = 'cz';
   		    $data['age'] = 12;
   		    $data['sex'] = 31;
   		    $data['bc'] =  'i like you very much';
    		$User->add($data);
    		echo 'ok'."&&&&&&&".$User->getPk();
      }
   
}
?>